home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Programming / MuManual / Include / mmu / mmutags.i < prev   
Text File  |  2000-04-02  |  7KB  |  188 lines

  1.         IFND MMU_MMUTAGS_I
  2. MMU_MMUTAGS_I   SET     1
  3. ;*************************************************************************
  4. ;** mmu.library                                                         **
  5. ;**                                                                     **
  6. ;** a system library for arbitration and control of the MC68K MMUs      **
  7. ;**                                                                     **
  8. ;** © 1999 THOR-Software, Thomas Richter                                **
  9. ;** No commercial use, reassembly, modification without prior, written  **
  10. ;** permission of the authors.                                          **
  11. ;** Including this library in any commercial software REQUIRES a        **
  12. ;** written permission and the payment of a small fee.                  **
  13. ;**                                                                     **
  14. ;**---------------------------------------------------------------------**
  15. ;** Definition of tags for the MMU library                              **
  16. ;**                                                                     **
  17. ;** $VER: 42.00 (11.03.2000)                                            **
  18. ;*************************************************************************
  19.  
  20.         IFND EXEC_TYPES_I
  21.         INCLUDE "exec/types.i"
  22.         ENDC ; EXEC_TYPES_I
  23.  
  24.         IFND UTILITY_TAGITEM_I
  25.         INCLUDE "utility/tagitem.i"
  26.         ENDC ; UTILITY_TAGITEM_I
  27.  
  28.  
  29. MAPTAG_DUMMY            equ     (TAG_USER+$03e00000)
  30.  
  31. ;* SetProperties and SetPageProperties tags *
  32.  
  33. MAPTAG_DESTINATION      equ     (MAPTAG_DUMMY+1)
  34. ;* destination in case the memory gets remapped *
  35.  
  36. MAPTAG_BLOCKID          equ     (MAPTAG_DUMMY+2)
  37. ;* a unique block ID for swapped out pages. MUST be given. *
  38.  
  39. MAPTAG_USERDATA         equ     (MAPTAG_DUMMY+3)
  40. ;* user data for invalid, non-repairable pages. Optional. *
  41.  
  42. MAPTAG_DESCRIPTOR       equ     (MAPTAG_DUMMY+4)
  43. ;* the real descriptor for indirect pages. *
  44.  
  45.  
  46. ;* CreateMMUContext tags *
  47.  
  48. MCXTAG_DUMMY            equ     (TAG_USER+$03e00100)
  49.  
  50. MCXTAG_COPY             equ     (MCXTAG_DUMMY+$001)
  51. ;* copy the definition from another context, given as tag argument *
  52.  
  53. MCXTAG_EXECBASE         equ     (MCXTAG_DUMMY+$010)
  54. ;* disable the special AbsExecBase and low-memory handling ? *
  55.  
  56. MCXTAG_BLANKFILL        equ     (MCXTAG_DUMMY+$011)
  57. ;* a LONG value to fill "blank" memory with *
  58.  
  59. MCXTAG_MEMORYATTRS      equ     (MCXTAG_DUMMY+$012)
  60. ;* the memory attributes to allocate the MMU tables from,
  61. ;* defaults to MEMF_PUBLIC *
  62.  
  63.  
  64. MCXTAG_PRIVATESUPER     equ     (MCXTAG_DUMMY+$013)
  65. ;* Create a private supervisor MMU table as well?
  66. ;* This defaults to FALSE, but even if the argument is
  67. ;* set to FALSE explicitly, the library might ignore your
  68. ;* choice and build a supervisor table if your table layout
  69. ;* is incompatible to the default supervior table.
  70.  
  71. MCXTAG_ZEROBASE         equ     (MCXTAG_DUMMY+$014)
  72. ;* If the zeropage is invalidated, read the data from where?
  73. ;* This must be set explicitly if the zero page gets remapped,
  74. ;* unfortunately. Might be fixed in a future release. *
  75.  
  76. MCXTAG_DISCACHEDES      equ     (MCXTAG_DUMMY+$15)
  77. ;* Mark the memory allocated allocated for the descriptors of THIS
  78. ;* context as cacheinhibit.
  79. ;* Defaults to FALSE.
  80. ;* 
  81.  
  82. MCXTAG_LOWMEMORYLIMIT   equ     (MCXTAG_DUMMY+$016)
  83. ;* Define a boundary in the zero page such that accesses to
  84. ;* addresses higher than this boundary will be emulated in
  85. ;* software. This is mainly for 68060/68040 support under Os
  86. ;* V37 and V38 where chip memory started at 0x400 inside the
  87. ;* zero page. (NEW for V42)
  88.  
  89.  
  90. MCXTAG_DEPTH            equ     (MCXTAG_DUMMY+$020)
  91. ;* define the depth of the MMU tree to build. Defaults to the
  92. ;* depth of the default tree, which is *usually* three.
  93. ;* Ranges from 1 to 4 *
  94.  
  95. MCXTAG_LEVELABITS       equ     (MCXTAG_DUMMY+$021)
  96. ;* number of bits to reserve for the top level of the tree *
  97.  
  98. MCXTAG_LEVELBBITS       equ     (MCXTAG_DUMMY+$022)
  99. ;* number of bits for the level B of the tree, if the depth is >1 *
  100.  
  101. MCXTAG_LEVELCBITS       equ     (MCXTAG_DUMMY+$023)
  102. ;* number of bits for the level C of the tree, if the depth is >2 *
  103.  
  104. MCXTAG_LEVELDBITS       equ     (MCXTAG_DUMMY+$024)
  105. ;* bits for the level D of the tree, if the depth is 4 *
  106.  
  107. MCXTAG_PAGEBITS         equ     (MCXTAG_DUMMY+$025)
  108. ;* the number of bits used for the page, 2^bits is the page size *
  109.  
  110. MCXTAG_ERRORCODE        equ     (MCXTAG_DUMMY+$030)
  111. ;* a pointer to a ULONG, to fill in an error code from CreateContext *
  112.  
  113.  
  114.  
  115.  
  116. ;* AddContextHook tags *
  117.  
  118. MADTAG_DUMMY            equ     (TAG_USER+$03e00200)
  119.  
  120. MADTAG_CONTEXT          equ     (MADTAG_DUMMY+0)
  121. ;* the context to which the context hook should be added. *
  122.  
  123. MADTAG_TASK             equ     (MADTAG_DUMMY+1)
  124. ;* if the exception is task specific, then this is the task pointer.
  125. ;* Note that many task specific handlers slow down exception handling. *
  126.  
  127. MADTAG_TYPE             equ     (MADTAG_DUMMY+2)
  128. ;* type of the exception, MMUEH_SEGFAULT, MMUEH_SWAPPED, MMUEH_SWITCH or
  129. ;* MMUEH_LAUNCH. See exceptions.h *
  130.  
  131. MADTAG_CODE             equ     (MADTAG_DUMMY+3)
  132. ;* the code to be called on exceptions. Should be assembly.
  133. ;* a0 is the struct ExceptionData *, a1 and a4 are pointers to the data
  134. ;* item, see below, a5 is the pointer to the code and a6 is the MMUBase.
  135. ;* d0-d1/a0-a1 and a4-a5 are scratch registers. The exception handler must
  136. ;* return with the Z flag set (i.e. an "equal" condition) and d0 cleared to
  137. ;* indicate that it handled the exception and no other handler should be
  138. ;* called. *
  139.  
  140. MADTAG_DATA             equ     (MADTAG_DUMMY+4)
  141. ;* data to be loaded for the exception handler, will be passed in a1
  142. ;* and a4 *
  143.  
  144. MADTAG_NAME             equ     (MADTAG_DUMMY+5)
  145. ;* a unique name for the handler. The library makes currently no use of
  146. ;* this name. *
  147.  
  148. MADTAG_PRI              equ     (MADTAG_DUMMY+6)
  149. ;* the priority of the handler. Higher priority handlers are called first.
  150. ;* Should be above 32 for "emergency stack swap in" handlers, between 32
  151. ;* and -32 for standard handlers and below -32 for debugging tools like the
  152. ;* Enforcer and similar. *
  153.  
  154.  
  155.  
  156. ;* AddMessageHook tags *
  157.  
  158. MADTAG_CATCHERPORT      equ     (MADTAG_DUMMY+$100)
  159. ;* the port to send the exception message to for message hook types. *
  160.  
  161.  
  162. ;* GetContextData tags *
  163.  
  164.  
  165. MGXTAG_DUMMY            equ     (TAG_USER+$03e00400)
  166.  
  167. MGXTAG_PAGESIZE         equ     (MGXTAG_DUMMY+0)
  168. ;* Identical to GetPageSize() (GET only) *
  169.  
  170. MGXTAG_REMAPSIZE        equ     (MGXTAG_DUMMY+1)
  171. ;* Identical to RemapSize() (GET only) *
  172.  
  173. MGXTAG_ROOT             equ     (MGXTAG_DUMMY+2)
  174. ;* Address of the MMU tree root. You usually do not need it (GET only). *
  175.  
  176. MGXTAG_CONFIG           equ     (MGXTAG_DUMMY+3)
  177. ;* Return a pointer to struct MMUConfig (GET only). *
  178.  
  179. MGXTAG_USERDATA         equ     (MGXTAG_DUMMY+$100)
  180. ;* Return the user data (GET and SET). *
  181.  
  182. MGXTAG_ADDRESSSPACE     equ     (MGXTAG_DUMMY+$101)
  183. ;* Return the address space. Reserved for the memory lib (GET and SET). *
  184.  
  185.  
  186.         ENDC    ; MMU_MMUTAGS_I
  187.  
  188.